﻿Imports Microsoft.VisualBasic

Namespace My
    Public Structure WorkHeaderCreateType
        Public Shared Planned As New WorkHeaderCreateType("P")
        Public Shared FromVolunteer As New WorkHeaderCreateType("V")

        Private codeField As String

        Public ReadOnly Property Code()
            Get
                Return Me.codeField
            End Get
        End Property

        Public Sub New(ByVal code As String)
            Me.codeField = code
        End Sub

        Public Shared Operator =(ByVal value1 As WorkHeaderCreateType, ByVal value2 As WorkHeaderCreateType) As Boolean
            If value1.Code = value2.Code Then
                Return True
            Else
                Return False
            End If
        End Operator

        Public Shared Operator <>(ByVal value1 As WorkHeaderCreateType, ByVal value2 As WorkHeaderCreateType) As Boolean
            If value1.Code <> value2.Code Then
                Return True
            Else
                Return False
            End If
        End Operator

        Public Overrides Function ToString() As String
            Return Me.Code
        End Function
    End Structure
End Namespace
